package ai.people.netmon.framework.domain.graph.tags;

import ai.people.netmon.framework.domain.graph.BaseTag;
import ai.people.netmon.framework.domain.archives.vo.ArchivesVO;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.annotation.JSONType;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * 公司信息tag
 *
 * @author zhenglin
 * @date 2022/4/25
 */
@Data
@NoArgsConstructor
@JSONType(naming = PropertyNamingStrategy.SnakeCase)
public class CompanyTag extends BaseTag {
    /**
     * 名称
     */
    @NotBlank(message = "公司名称不能为空")
    private String name;

    /**
     * 地址
     */
    private String area;

    /**
     * 成立时间
     */
    private String establishmentTime;

    /**
     * 法定代表人
     */
    private String legalRepresentative;

    /**
     * 股东信息
     */
    private String shareholderInfo;

    /**
     * 企业类型
     */
    private String enterpriseType;

    /**
     * 工商注册号
     */
    private String icRegistrationNum;

    /**
     * 纳税人识别号
     */
    private String taxpayerIdentificationNum;

    /**
     * 纳税人资质
     */
    private String taxpayerQualification;

    /**
     * 统一社会信用代码
     */
    private String unifiedSocialCreditCode;

    /**
     * 人员规模
     */
    private String personnelScale;

    /**
     * 参保人员
     */
    private String insuredPersons;

    /**
     * 登记机关
     */
    private String registrationAuthority;

    /**
     * 所属行业
     */
    private String industry;

    /**
     * 公司情况
     */
    private String companySituation;

    public CompanyTag(ArchivesVO.CompanyInfo companyInfo) {
        this.name = companyInfo.getName();
        this.area = companyInfo.getArea();
        this.establishmentTime = companyInfo.getEstablishmentTime();
        this.legalRepresentative = companyInfo.getLegalRepresentative();
        this.shareholderInfo = companyInfo.getShareholderInfo();
        this.enterpriseType = companyInfo.getEnterpriseType();
        this.icRegistrationNum = companyInfo.getIcRegistrationNum();
        this.taxpayerIdentificationNum = companyInfo.getTaxpayerIdentificationNum();
        this.taxpayerQualification = companyInfo.getTaxpayerQualification();
        this.unifiedSocialCreditCode = companyInfo.getUnifiedSocialCreditCode();
        this.personnelScale = companyInfo.getPersonnelScale();
        this.insuredPersons = companyInfo.getInsuredPersons();
        this.registrationAuthority = companyInfo.getRegistrationAuthority();
        this.industry = companyInfo.getIndustry();
        this.companySituation = companyInfo.getCompanySituation();
    }
}
